<template>
      <div id="book">
            <div v-for="path in covers" style="display: inline;">
                  <el-image
                          style="width: 96%;margin: 2%"
                          :src="resopa(path)"
                          :preview-src-list="scrPreview()"
                  ></el-image>
            </div>
      </div>
</template>

<script>

export default {
      name: "book",
      data() {
            return {
                  covers: []
            }
      },
      methods: {
            resopa: function (path) {
                  return this.basicUrl + "/" + path.path + "/" + path.name
            },
            scrPreview: function () {
                  return this.covers.map(T => this.resopa(T))
            }
      },
      created: function () {
            let self = this;
            this.axios.get(this.basicUrl + '/book?name=' + this.$route.query.name)
                    .then(function (response) {
                          self.covers = response.data;
                    })
      }
}
</script>